import request from '@/utils/axios'
import {
  URL_API
} from '@/utils/mUtils'
const base = URL_API()
//创建计费产品
export function billingCreateFn(params) {
  return request({
    url: `${base}/api/company/billing_engine/quotation_way/create`,
    method: 'post',
    data: params,

  })
}

//计费产品列表
export function billingListFn(params) {
  return request({
    url: `${base}/api/company/billing_engine/quotation_way/list`,
    method: 'post',
    data: params,

  })
}
//编辑计费产品
export function UpdateBillingQuotation(params) {
  return request({
    url: `${base}/api/company/billing_engine/quotation_way/update`,
    method: 'put',
    data: params,

  })
}

//计费产品详情
export function DetailBillingQuotation(params) {
  return request({
    url: `${base}/api/company/billing_engine/quotation_way/detail`,
    method: 'post',
    data: params,

  })
}

//计费产品列表删除
export function DeleteBillingQuotation(params) {
  return request({
    url: `${base}/api/company/billing_engine/quotation_way/delete`,
    method: 'delete',
    data: params,

  })
}

//创建价格API接口函数
export function billingCreateFeeFn(params) {
  return request({
    url: `${base}/api/company/billing_engine/billing_rule/create`,
    method: 'post',
    data: params,

  })
}

//价格列表API接口函数
export function billingFeeListFn(params) {
  return request({
    url: `${base}/api/company/billing_engine/billing_rule/list`,
    method: 'post',
    data: params,

  })
}

//修改价格API接口函数
export function modifyBillingFeeFn(params) {
  return request({
    url: `${base}/api/company/billing_engine/billing_rule/update`,
    method: 'put',
    data: params,

  })
}

//删除价格API接口函数
export function deleteBillingFeeFn(params) {
  return request({
    url: `${base}/api/company/billing_engine/line/delete`,
    method: 'delete',
    data: params,

  })
}


//创建折扣API接口函数  
export function billingCreateIncreasesFn(params) {
  return request({
    url: `${base}/api/company/billing_engine/discounts_or_increases/create`,
    method: 'post',
    data: params,

  })
}

//产品类型API列表 
export function OptionList(params) {
  return request({
    url: `${base}/api/transportType/list`,
    method: 'post',
    data: params,
  })
}

//发货人接口
export function shipperBox(params) {
  return request({
    url: `${base}/api/company/shipper/box`,
    method: 'post',
    data: params,

  })
}

//收货人接口 
export function consigneeBox(params) {
  return request({
    url: `${base}/api/company/consignee/box`,
    method: 'post',
    data: params,

  })
}

//折扣列表
export function BillingDiscountsList(params) {
  return request({
    url: `${base}/api/company/billing_engine/discounts_or_increases/list`,
    method: 'post',
    data: params,

  })
}

//折扣删除  
export function BillingDiscountsDelete(params) {
  return request({
    url: `${base}/api/company/billing_engine/discounts_or_increases/delete`,
    method: 'delete',
    data: params,

  })
}

//折扣编辑  
export function BillingDiscountsUpdate(params) {
  return request({
    url: `${base}/api/company/billing_engine/discounts_or_increases/update`,
    method: 'put',
    data: params,

  })
}

//折扣详情  
export function BillingDiscountsDetail(params) {
  return request({
    url: `${base}/api/company/billing_engine/discounts_or_increases/detail`,
    method: 'post',
    data: params,

  })
}

//获取三级地区
// export function reqRegionList(params) {
//   return request({
//     url: `http://192.168.5.2:8080/api/company/region/box`,
//     method: 'post',
//     data: params,

//   })
// }